using System;
using System.IO;
using System.Reflection;

namespace ClownFish
{
	public static class Profiler
	{
		private static string string_0 = "MyWebSite";

		public static string ApplicationName
		{
			get
			{
				return Profiler.string_0;
			}
			set
			{
				if (!string.IsNullOrEmpty(value))
				{
					Profiler.string_0 = value;
				}
			}
		}

		public static bool TryStartClownFishProfiler()
		{
			try
			{
				string path = Class29.bool_0 ? Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "bin\\ClownFishProfilerLib.dll") : Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ClownFishProfilerLib.dll");
				if (File.Exists(path))
				{
					Type type = Type.GetType("ClownFishProfilerLib.EventHelper, ClownFishProfilerLib");
					bool result;
					if (type == null)
					{
						result = false;
						return result;
					}
					type.InvokeMember("SubscribeNotify", BindingFlags.Static | BindingFlags.Public | BindingFlags.InvokeMethod, null, null, null);
					result = true;
					return result;
				}
			}
			catch
			{
			}
			return false;
		}
	}
}
